from dingtalkchatbot.chatbot import DingtalkChatbot
import cy_config

def send_message(message):
    user_name = '账号名'
    message = '收益通知：' + user_name + '开仓总金额：' + cy_config.open_total_price + ' ' + message

    # 需要从钉钉获取webhook
    webhook = ''

    orderNotify = DingtalkChatbot(webhook)

    orderNotify.send_text(msg=message, is_at_all=False)

def send_trad_message(message):

    user_name = '账号名'

    message = '成交通知：' + user_name + '\n' + message

    # 需要从钉钉获取webhook
    webhook = ''

    orderNotify = DingtalkChatbot(webhook)

    orderNotify.send_text(msg=message, is_at_all=False)

def send_report_message(message):

    user_name = '账号名'

    message = '警报：' + user_name + '\n' + message

    # 需要从钉钉获取webhook
    webhook = ''

    orderNotify = DingtalkChatbot(webhook)

    orderNotify.send_text(msg=message, is_at_all=False)
